package com.zhang.mapper;

import com.zhang.entity.ProductSalePropertyKey;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * spu销售属性 Mapper 接口
 * </p>
 *
 * @author zbw
 * @since 2022-04-07
 */
@Mapper
public interface ProductSalePropertyKeyMapper extends BaseMapper<ProductSalePropertyKey> {

    //根据spu查询spu的销售属性
    List<ProductSalePropertyKey> querySalePropertyByProductId(Long spuId);

    //d.获取该SKU对应的销售属性(一份)和所有的销售属性(全份)
    List<ProductSalePropertyKey> getSpuSalePropertyAndSelected(Long productId, Long skuId);
}
